# coding:utf-8

import random

gifts = ['iphone13','ipad2021','car','tv']

def choice_gifts():
    gift = random.choice(gifts)
    print('你得到了%s' % gift)

def choice_gifts_new():
    count = random.randrange(0,100,1)
    if 0 <= count <= 50:
        print('你中了一个iphone13')
    elif 50 < count <= 70:
        print('你中了一个ipad')
    elif 70 < count < 90:
        print('你中了一个tv电视')
    else:
        print('你中了一辆汽车')

if __name__ == '__main__':
    choice_gifts_new()
